<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.10/vue.js"></script>
</head>
<body>
<div id="app">
    <App></App>
</div>
<script>
  const App = Vue.extend({
        template:`
        <div>
            <h1>App组件{{count}}</h1>
            <button @click="changeCount">累加</button>
        </div>
        `,
      data(){
          return{
              count:1,
          }
      },
      methods:{
            changeCount(){
                this.count++;
            }
      }
  })
  const vm = new Vue({
    el:"#app",
    data(){
      return{}
    },
      components:{
        App,
      }
  })
</script>
</body>
</html>
<script>
</script>